<?php abstract class uptime extends RRDTemplate implements iRRDTemplate, iReconfigurable {
	protected static $Dir = '.';
	public static function Reconfigure (array $Config) {
		if (array_key_exists ('dir', $Config)) {
			$Dir = $Config ['dir'];
			Out::I (Msg::ConfigGot, 'dir', $Dir);
			if (is_dir ($Dir)) {
				if (is_writeable ($Dir)) {
					Out::I (Msg::ConfigApplied, 'dir', $Dir);
					self::$Dir = $Dir;
				} else Out::W (Msg::NotWriteable, $Dir);
			} else Out::W (Msg::NotADirectory, $Dir);
		} else Out::W (Msg::ConfigMiss, 'dir');
	}
	public static function Feed ($Time, $Host, $Data) {
		@file_put_contents ($Filename = self::$Dir.'/'.$Host, $Data) or Out::W (Msg::WriteFileFail, $Filename);
	}
} ?>